<?
/**
 * @package timeline-history
 */
(basename($_SERVER['PHP_SELF']) == basename(__FILE__)) && die('Access Denied');

// webapp actions
define('ACTION_LOGIN',      'li');
define('ACTION_LOGOUT',     'lo');
define('ACTION_PASSCHANGE', 'pc');

// html search engine query strings
define('WA_ACTION_PREVIOUS',  'ap');
define('WA_QS_ACTION',        'a');
define('WA_QS_APPLET',        'app');
define('WA_QS_CONFIRM',       'confirm');
define('WA_QS_DOWNLOAD',      'down');
define('WA_QS_ID',            'id');
define('WA_QS_ORDER',         'o');
define('WA_QS_PAGE',          'p');
define('WA_QS_PASS1',         'p1');
define('WA_QS_PASS2',         'p2');
define('WA_QS_PROPERTY',      'prop');
define('WA_QS_SEARCH_FIELDS', 'sf');
define('WA_QS_SEARCH_TERMS',  'st');
define('WA_QS_SEARCH_TYPES',  'stxt');
define('WA_QS_SORT',          's');
define('WA_QS_USERNAME',      'un');

// misc database object properties
define('WA_QS_UID', 'uid'); // user id

// Applets
define('APPLET_ADMIN',               'Admin');
define('APPLET_ADMIN_CATEGORIES',    'AdminCategories');
define('APPLET_ADMIN_SOURCES',       'AdminSources');
define('APPLET_ADMIN_USERS',         'AdminUsers');
define('APPLET_EVENTS',              'Events');
define('APPLET_LOG',                 'Log');

// Strings to describe menu option buttons
define('OPT_ADMIN',               'Admin Utilities');
define('OPT_ADMIN_CATEGORIES',    'Manage Categories');
define('OPT_ADMIN_SOURCES',       'Manage Sources');
define('OPT_ADMIN_USERS',         'Manage Users');
define('OPT_EVENTS',              'Manage Events');
define('OPT_HOME',                'Main Menu');
define('OPT_LOG',                 'System Log');
define('OPT_LOGOUT',              'Logout');
define('OPT_PASSCHANGE',          'Change Password');

// Shared by multiple applets
define('ACTION_ADD',          'add');
define('ACTION_DEL',          'del');
define('ACTION_DISABLE',      'dis');
define('ACTION_EDIT',         'edit');
define('ACTION_ENABLE',       'ena');
define('ACTION_LIST',         'list');
define('ACTION_TOGGLE',       'tog');
define('ACTION_VIEW',         'view');

// Strings and error codes used by authentication module
define('WA_FAIL_INVALID_CREDS', 1);
define('WA_FAIL_NO_USERNAME',   2);
define('WA_FAIL_NO_PASSWORD',   3);
define('WA_FAIL_EXPIRED',       4);
define('WA_FAIL_DISABLED',      5);
define('WA_FAIL_OBJECT',        6);
define('WA_FAIL_QUERY',         7);
(!defined('PASSWORD_MIN_LEN'))    && define('PASSWORD_MIN_LEN',7);      // minimum password length
(!defined('PASSWORD_MAX_LEN'))    && define('PASSWORD_MAX_LEN',14);     // maximum password length
(!defined('PASSWORD_UNIQUENESS')) && define('PASSWORD_UNIQUENESS',3);   // minimum number of character types
(!defined('PASSWORD_CHECKHIST'))  && define('PASSWORD_CHECKHIST',true); // disallow use of previous 2 passwords

// Misc
define('WA_MAX_ROWS', 20);
?>
